mirror of
https://github.com/MisskeyIO/misskey
synced 2024-12-15 15:18:18 +09:00
Merge branch 'develop'
This commit is contained in:
commit
c6cef0162d
@ -5,6 +5,11 @@ If you encounter any problems with updating, please try the following:
|
|||||||
1. `npm run clean` or `npm run cleanall`
|
1. `npm run clean` or `npm run cleanall`
|
||||||
2. Retry update (Don't forget `npm i`)
|
2. Retry update (Don't forget `npm i`)
|
||||||
|
|
||||||
|
11.1.3 (2019/04/16)
|
||||||
|
-------------------
|
||||||
|
### Fixes
|
||||||
|
* アプリからAPIにリクエストするときにランダムなユーザーがリクエストしたことになる問題を修正
|
||||||
|
|
||||||
11.1.2 (2019/04/15)
|
11.1.2 (2019/04/15)
|
||||||
-------------------
|
-------------------
|
||||||
### Fixes
|
### Fixes
|
||||||
|
@ -57,7 +57,13 @@ Build misskey with the following:
|
|||||||
|
|
||||||
`docker-compose build`
|
`docker-compose build`
|
||||||
|
|
||||||
*5.* That is it.
|
*5.* Init DB
|
||||||
|
----------------------------------------------------------------
|
||||||
|
``` shell
|
||||||
|
docker-compose run --rm web npm run init
|
||||||
|
```
|
||||||
|
|
||||||
|
*6.* That is it.
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
Well done! Now you have an environment to run Misskey.
|
Well done! Now you have an environment to run Misskey.
|
||||||
|
|
||||||
|
@ -57,7 +57,13 @@ cp docker_example.env docker.env
|
|||||||
|
|
||||||
`docker-compose build`
|
`docker-compose build`
|
||||||
|
|
||||||
*5.* 以上です!
|
*5.* データベースを初期化
|
||||||
|
----------------------------------------------------------------
|
||||||
|
``` shell
|
||||||
|
docker-compose run --rm web npm run init
|
||||||
|
```
|
||||||
|
|
||||||
|
*6.* 以上です!
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
お疲れ様でした。これでMisskeyを動かす準備は整いました。
|
お疲れ様でした。これでMisskeyを動かす準備は整いました。
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "11.1.2",
|
"version": "11.1.3",
|
||||||
"codename": "daybreak",
|
"codename": "daybreak",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn, RelationId } from 'typeorm';
|
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
||||||
import { User } from './user';
|
import { User } from './user';
|
||||||
import { App } from './app';
|
import { App } from './app';
|
||||||
import { id } from '../id';
|
import { id } from '../id';
|
||||||
@ -25,7 +25,8 @@ export class AccessToken {
|
|||||||
})
|
})
|
||||||
public hash: string;
|
public hash: string;
|
||||||
|
|
||||||
@RelationId((self: AccessToken) => self.user)
|
@Index()
|
||||||
|
@Column(id())
|
||||||
public userId: User['id'];
|
public userId: User['id'];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne(type => User, {
|
||||||
|
@ -31,7 +31,9 @@ export default async (token: string): Promise<[User | null | undefined, App | nu
|
|||||||
.findOne(accessToken.appId);
|
.findOne(accessToken.appId);
|
||||||
|
|
||||||
const user = await Users
|
const user = await Users
|
||||||
.findOne(accessToken.userId);
|
.findOne({
|
||||||
|
id: accessToken.userId // findOne(accessToken.userId) のように書かないのは後方互換性のため
|
||||||
|
});
|
||||||
|
|
||||||
return [user, app];
|
return [user, app];
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
import rndstr from 'rndstr';
|
import rndstr from 'rndstr';
|
||||||
|
|
||||||
export default () => `0${rndstr('a-zA-Z0-9', 15)}`;
|
export default () => rndstr('a-zA-Z0-9', 16);
|
||||||
|
@ -1 +1 @@
|
|||||||
export default (token: string) => token.startsWith('0');
|
export default (token: string) => token.length === 16;
|
||||||
|
@ -39,7 +39,7 @@ export default define(meta, async (ps, user) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate access token
|
// Generate access token
|
||||||
const accessToken = '1' + rndstr('a-zA-Z0-9', 15);
|
const accessToken = rndstr('a-zA-Z0-9', 32);
|
||||||
|
|
||||||
// Fetch exist access token
|
// Fetch exist access token
|
||||||
const exist = await AccessTokens.findOne({
|
const exist = await AccessTokens.findOne({
|
||||||
|
@ -238,8 +238,6 @@ export default define(meta, async (ps, user, app) => {
|
|||||||
userId: user.id
|
userId: user.id
|
||||||
})
|
})
|
||||||
))).filter(file => file != null) as DriveFile[];
|
))).filter(file => file != null) as DriveFile[];
|
||||||
|
|
||||||
files = files;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let renote: Note | undefined;
|
let renote: Note | undefined;
|
||||||
|
Loading…
Reference in New Issue
Block a user